<div class="ribbon">
    <a href=""><span class="home fa fa-home"></span></a>
    <ol class="breadcrumb">
        <li>订单指派列表</li>
    </ol>
</div>

<div class="table-wrapper">

    <div class="toolbar">
        <form role="form">
            <div class="row">
                <div class="col-md-2">
                    <label class="input">订单状态：</label>
                    <label class="input"><select  ng-model="q.orderStatus" ng-options="orderStatus.value for orderStatus in vm.orderStatus" class="form-control" ng-selected="" ng-change="orderStatusSearchChange()"></select></label>
                </div>
                <!--<div class="col-md-4">-->
                    <!--<label class="input">时间范围：</label>-->
                    <!--<label class="input"><input type="text"  id="datetimepickerStart" name="productionDate" class="form-control" ng-model="vm.bottle.productionDate" required></label>-->
                    <!--<label class="input">—</label>-->
                    <!--<label class="input"><input type="text"  id="datetimepickerEnd" name="productionDate" class="form-control" ng-model="vm.bottle.productionDate" required></label>-->
                <!--</div>-->
            </div>
        </form>
    </div>
    <table class="table table-striped table-hover props table-sm">
        <thead>
        <tr>
            <th width="1%"></th>
            <th width="3%">序号</th>
            <th width="3%">类型</th>
            <th width="8%">订单编号</th>
            <th width="5%">订单状态</th>
            <th width="5%">接入方式</th>
            <th width="5%">支付方式</th>
            <th width="5%">订单客户</th>


            <th width="20%">收货地址</th>
            <th width="5%">收货人</th>
            <th width="5%">配送员</th>

            <th width="5%">支付状态</th>
            <th width="5%">金额(元)</th>
            <th width="9%">创建时间</th>
            <th width="9%">预约时间</th>
            <th width="15%">操作</th>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="order in vm.orderList" ng-class="{danger:order.timeSpan>10&&order.orderStatus==0}">
            <td></td>
            <td class="message">{{$index+1+pager.pageSize*(pager.getCurPageNo()-1)}}</td>
            <td ng-if="order.orderTriggerType.index==1">
                <div style="width:50px;height:50px;background-color:#F0F; border-radius: 50%;color:#FFF;text-align:center;line-height:50px;:middle;font-size: large">斤
                </div>
            </td>
            </td>
            <td ng-if="order.orderTriggerType.index!=1" >
                <div style="width:50px;height:50px;background-color:#00F; border-radius: 50%;color:#FFF;text-align:center;line-height:50px;:middle;font-size: large">瓶
                </div>
            </td>
            <td class="message">{{order.orderSn}}</td>
            <td class="message">{{vm.orderStatusDisplay[order.orderStatus]}}</td>
            <td class="message">{{order.accessType.name}}</td>
            <td class="message">{{order.payType.name}}</td>
            <td class="message">{{order.customer.userId}}</td>


            <td class="message">{{order.recvAddr.province}}{{order.recvAddr.city}}{{order.recvAddr.county}}{{order.recvAddr.detail}}</td>
            <td class="message" title="电话：{{order.recvPhone}}">{{order.recvName}}</td>

            <td class="message" title="电话：{{order.dispatcher.mobilePhone}} 工号：{{order.dispatcher.jobNumber}}">{{order.dispatcher.name}}</td>

            <td class="message">{{order.payStatus.name}}</td>
            <td class="message">{{getFixData(order.orderAmount)}}</td>
            <td class="message">{{order.createTime}}</td>
            <td class="message">{{order.reserveTime}}</td>
            <td class="operate">
                <button title="详情" ng-click="viewDetails(order)" type="button" class="btn btn-primary btn-outline btn-xs">
                    <i class="">详情</i>
                </button>
                <button title="强派" ng-if="order.taskId&&order.orderStatus==0" ng-click="assign(order)" type="button" class="btn btn-primary btn-outline btn-xs">
                    <i class="">强派</i>
                </button>
                <button title="转派" ng-if="order.taskId&&order.orderStatus==1" ng-click="transfer(order)" type="button" class="btn btn-primary btn-outline btn-xs">
                    <i class="">转派</i>
                </button>
            </td>
        </tr>
        </tbody>
    </table>
    <div ng-if="vm.userList.length == 0" nj-table-no-data></div>
    <div nj-pager pager="pager"></div>
    <div id="aaaa" style="width:500px; height:300px"></div>
</div>
